package com.ux.manager
{
	import com.ux.util.JsUtil;
	
	/**
	 * SNSManager
	 * <br>
	 * SNS 에 글 공유하기 위한 매니져
	 * @author XPRIME/황현재 - 김정환 수정
	 */	
	public class SNSManager
	{
		
		//--------------------------------------------------------------------
		//
		// Public Static Function
		//
		//--------------------------------------------------------------------
		
		/**
		 * Facebook 공유
		 * @param url 공유할 URL
		 * @param title 컨텐츠 타이틀
		 */		
		public static function shareFacebook(url:String, title:String) : void
		{
			JsUtil.windowOpen("http://www.facebook.com/sharer.php?u="+url+"&t="+title);
		}
		
		/**
		 * Me2Day 공유
		 * @param content 본문 내용
		 * @param tag 태그명
		 */		
		public static function shareMe2Day(content:String, tag:String) : void
		{
			JsUtil.windowOpen("http://me2day.net/posts/new?new_post[body]="+content+"&new_post[tag]="+tag);
		}
		
		/**
		 * Twitter 공유
		 * @param url 공유할 URL
		 * @param content 본문 내용
		 */		
		public static function shareTwitter(url:String, content:String) : void
		{
			JsUtil.windowOpen("http://twitter.com/share?url="+url+"&text="+content);
		}
		
		/**
		 * Cyworld 공유
		 * @param url 공유할 URL
		 */		
		public static function shareCyworld(url:String) : void
		{
			JsUtil.windowOpen("http://csp.cyworld.com/bi/bi_recommend_pop.php?url="+url+"?Dep0=cy_sharing");
		}
		
		/**
		 * 
		 * @param title 타이틀
		 * @param url 공유할 URL
		 */		
		public static function shareGoogle(title:String, url:String) : void
		{
			JsUtil.windowOpen("http://www.google.com/bookmarks/mark?op=add&title="+title+"&bkmk="+url);
		}
		
		/**
		 * Delicious 공유
		 * @param title 타이틀
		 * @param url 공유할 URL
		 */		
		public static function shareDelicious(title:String, url:String) : void
		{
			JsUtil.windowOpen("http://del.icio.us/post?title="+title+"&url="+url);
		}
		
		
		
		
		
		//--------------------------------------------------------------------
		//
		// Constructor
		//
		//--------------------------------------------------------------------
		
		/**
		 * SNSManager 생성자
		 */		
		public function SNSManager()
		{
			
		}
		
		
		
	}
}